/*
 * EnumFormatEtc.h
 *
 *  Created on: 2012-9-1
 *      Author: yangentao@gmail.com
 */


#include <windows.h>
#include <ole2.h>
namespace yet{

HRESULT CreateEnumFormatEtc(UINT nNumFormats, FORMATETC *pFormatEtc, IEnumFORMATETC **ppEnumFormatEtc);

class EnumFormatEtc: public IEnumFORMATETC {
private:
	volatile LONG refCount;
	int pos;
	FORMATETC* formats; //TODO pointer ?
	int len;
public:
	virtual ~EnumFormatEtc();
	EnumFormatEtc(FORMATETC formats_[], int length);
public:
	ULONG __stdcall AddRef(void);
	ULONG __stdcall Release(void);
	HRESULT __stdcall QueryInterface(REFIID riid, void** ppv);
public:
	HRESULT __stdcall Next( ULONG celt, FORMATETC *pFormatEtc, ULONG *pceltFetched);
	HRESULT __stdcall Skip( ULONG celt);
	HRESULT __stdcall Reset(void);
	HRESULT __stdcall Clone( IEnumFORMATETC **ppenum);
}
;

}
